﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using WebServices;
using WebInterface;

namespace WebAppHappyNewYear.Controllers
{
    public class ThirdController : Controller
    {

        private readonly ILogger<ThirdController> _logger;
        private readonly ITestServiceA _testServiceA;
        private readonly ITestServiceB _testServiceB;
        private readonly ITestServiceC _testServiceC;
        private readonly ITestServiceD _testServiceD;
        private readonly ITestServiceE _testServiceE;
        private readonly IA _ia;
        public ThirdController(ILogger<ThirdController> logger,
            ITestServiceA testServiceA,
            ITestServiceB testServiceB,
            ITestServiceC testServiceC,
            ITestServiceD testServiceD,
            ITestServiceE testServiceE,
            IA ia)
        {
            _logger = logger;
            _testServiceA = testServiceA;
            _testServiceB = testServiceB;
            _testServiceC = testServiceC;
            _testServiceD = testServiceD;
            _testServiceE = testServiceE;
            _ia = ia;
        }

        public IActionResult Index(int id, string name)
        {
            _testServiceA.Show();
            _testServiceB.Show();
            _testServiceC.Show();
            _testServiceD.Show();
            _testServiceE.Show();

            _ia.Show(id,name);
            _logger.LogWarning("logWarning!");

            return View();
        }
    }
}